import time
start = time.time()
f = open('/home/guest/m1_sorted.txt')
sp = list(map(int, f))
print(sp)
for i in range(len(sp)-1):
    for j in range(len(sp)-1 -1):
        if sp[j] > sp[j + 1]:
            sp[j], sp[j + 1] = sp[j + 1], sp[j]
print(sp)
end = time.time()
print(end - start)

f1 = open("/home/guest/m2_reverse.txt")
sp1 = list(map(int, f1))
print(sp1)
for i in range(len(sp1)-1):
    for j in range(len(sp1)-1 -1):
        if sp1[j] > sp1[j + 1]:
            sp1[j], sp1[j + 1] = sp1[j + 1], sp1[j]
print(sp1)
end1 = time.time()
print(end1 - start)

f2 = open("/home/guest/m3_shuffle.txt")
sp2 = list(map(int, f2))
print(sp2)
for i in range(len(sp2)-1):
    for j in range(len(sp2)-1 -1):
        if sp2[j] > sp2[j + 1]:
            sp2[j], sp2[j + 1] = sp2[j + 1], sp2[j]
print(sp2)
end2 = time.time()
print(end2 - start)